package com.test.pojo.many2many;

import java.util.HashSet;
import java.util.Set;

public class Hero {
    private int id;
    private String name;

    private Set<Summoner> ssum = new HashSet<Summoner>();

    public Set<Summoner> getSsum() {
        return ssum;
    }

    public void setSsum(Set<Summoner> ssum) {
        this.ssum = ssum;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Hero hero = (Hero) o;

        if (id != hero.id) return false;
        if (name != null ? !name.equals(hero.name) : hero.name != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        return result;
    }
}
